<?php
/**
 * Created by PhpStorm.
 * User: xu42
 * Date: 16-9-7
 * Time: 下午1:24
 */

namespace App\Library;


class Timetable
{
    public static function today()
    {
        $weekarray = [6, 0, 1, 2, 3, 4, 5];
        return $weekarray[date( 'w' )];
    }

    public static function tomorrow()
    {
        $weekarray = [0, 1, 2, 3, 4, 5, 6];
        return $weekarray[date( 'w' )];
    }

    public static function TimetoHans( $number )
    {
        switch ( $number ) {
            case '0':
                $res = '第1-2节';
                break;

            case '1':
                $res = '第3-4节';
                break;

            case '2':
                $res = '第5-6节';
                break;

            case '3':
                $res = '第7-8节';
                break;

            case '4':
                $res = '第9-10节';
                break;

            case '5':
                $res = '第11-12节';
                break;
            default:
                $res = null;
                break;
        }
        return $res;
    }
}